From ce0a02dc06450d72a771ab5cda0e914e71d46a8e Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 25 Jun 2007 12:30:27 +0000 Subject: [PATCH] (main): Set console codepages to "ANSI". --- nt/cmdproxy.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nt/cmdproxy.c b/nt/cmdproxy.c index 4e4f1ef5c91..d01e7f39724 100644 --- a/nt/cmdproxy.c +++ b/nt/cmdproxy.c @@ -466,6 +466,12 @@ main (int argc, char ** argv) SetCurrentDirectory (modname); *progname = '\\'; + /* Due to problems with interaction between API functions that use "OEM" + codepage vs API functions that use the "ANSI" codepage, we need to + make things consistent by choosing one and sticking with it. */ + SetConsoleCP (GetACP()); + SetConsoleOutputCP (GetACP()); + /* Although Emacs always sets argv[0] to an absolute pathname, we might get run in other ways as well, so convert argv[0] to an absolute name before comparing to the module name. Don't get -- 2.30.2